<script>
	import updatechk from './static/js/update-chk.js'
	export default {
		globalData: {  
			erpUserInfo: null,
		},  
		methods: {
			init() {
				this.getPlatForm()
				// #ifdef APP-PLUS
				plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo){
					uni.setStorageSync('appWgtInfo',wgtinfo)
					updatechk.updateChk(wgtinfo)
				})
				// #endif
			},
			getPlatForm() {
				let platForm = null
				// #ifdef APP-PLUS
				platForm = 'app'
				// #endif
				// #ifdef APP-PLUS-NVUE
				platForm = 'app'
				// #endif
				// #ifdef H5
				platForm = 'h5'
				// #endif
				// #ifdef MP-WEIXIN
				platForm = 'wx'
				// #endif
				// #ifdef MP-ALIPAY
				platForm = 'alipay'
				// #endif
				// #ifdef MP-QQ
				platForm = 'qq'
				// #endif
				// #ifdef MP-BAIDU
				platForm = 'baidu'
				// #endif
				// #ifdef MP-360
				platForm = '360'
				// #endif
				// #ifdef MP-KUAISHOU
				platForm = 'kuaishou'
				// #endif
				// #ifdef MP-TOUTIAO
				platForm = 'toutiao'
				// #endif
				// #ifdef MP-LARK
				platForm = 'lark'
				// #endif
				uni.setStorageSync('platForm',platForm)
			}
		},
		onLaunch: function() {
			console.log('App Launch')
			this.init()
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	button{
		padding: 3px 25px;
		font-size: 14px;
		color: #fff;
		background-color: $uni-color-success;
	}
	// 按钮
	.u-btn{
		background-color: #eee;
		color: #fff;
		padding: 25rpx;
		border-radius: 50rpx;
		border: 1rpx solid #ccc;
		margin: 10rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		.iconfont{
			margin: 0 10rpx;
		}
	}
	.u-btn.success{
		background-color: $uni-color-success;
	}
	.u-btn.primary{
		background-color: $uni-color-primary;
	}
	.u-btn.warning{
		background-color: $uni-color-warning;
	}
	.u-btn.error{
		background-color: $uni-color-error;
	}
	// 文字按钮
.u-tbtn{
		// background-color: #fff;
		background-color: rgba(0,0,0,0);
		color: #ccc;
		padding: 0;
		padding-bottom: 10rpx;
		border-bottom: 3px solid #ccc;
		margin: 10rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-weight: 900;
		.iconfont{
			margin: 0;
			margin-right: 10rpx;
			font-weight: 900;
		}
	}
	.u-tbtn.success{
		color: $uni-color-success;
		border-bottom: 3px solid $uni-color-success;
	}
	.u-tbtn.primary{
		color: $uni-color-primary;
		border-bottom: 3px solid $uni-color-primary;
	}
	.u-tbtn.warning{
		color: $uni-color-warning;
		border-bottom: 3px solid $uni-color-warning;
	}
	.u-tbtn.error{
		color: $uni-color-error;
		border-bottom: 3px solid $uni-color-error;
	}
</style>
